package com.p595263720.o_amap.search.model;

import com.amap.api.services.geocoder.GeocodeAddress;
import com.amap.api.services.geocoder.GeocodeResult;

import java.util.ArrayList;
import java.util.List;

public class UnifiedGeocodeResult {
    private UnifiedGeocodeQuery geocodeQuery;
    private List<UnifiedGeocodeAddress> geocodeAddressList = new ArrayList<UnifiedGeocodeAddress>();

    public UnifiedGeocodeResult(GeocodeResult geocodeResult) {
        geocodeQuery = new UnifiedGeocodeQuery(geocodeResult.getGeocodeQuery());
        List<GeocodeAddress> list = geocodeResult.getGeocodeAddressList();
        if (list.size() > 0) {
            for (GeocodeAddress geocodeAddress : list) {
                UnifiedGeocodeAddress address = new UnifiedGeocodeAddress(geocodeAddress);
                geocodeAddressList.add(address);
                
            }
        }
    }
}
